﻿using System.Web.Mvc;

namespace Yelper.Web {

    public static class ProfilePictureUrlHelper {

        public static string ProfilePicture(this UrlHelper helper, User user) {

            string picname = user.ProfilePicture;
            string picurl = helper.Content("~/Content/ProfileImages/" + picname);
            if (picname == null || picname == "") {
                picurl = helper.Content("~/Content/Images/fox80.png");
            }

            return picurl;

        }

    }

}